package bean;

/**
 * Created by quincysx on 2017/7/18.
 */
public class Message {
    private String to;
    private String from;
    private String type;
    private Payload payload;

    public Message() {
    }

    public Message(String to, String from, String type, Payload payload) {
        this.to = to;
        this.from = from;
        this.type = type;
        this.payload = payload;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Payload getPayload() {
        return payload;
    }

    public void setPayload(Payload payload) {
        this.payload = payload;
    }

    @Override
    public String toString() {
        return "Message{" +
                "to='" + to + '\'' +
                ", form='" + from + '\'' +
                ", type='" + type + '\'' +
                ", payload=" + payload +
                '}';
    }
}
